home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-14 | 1.8 KB | 66 lines | [TEXT/MPS ] |
- //----------------------------------------------------------------------------------------
- // CTidyHeapLogFileLogger_AC.cp
- // Copyright © 1984-97 by Apple Computer, Inc. All rights reserved.
- //----------------------------------------------------------------------------------------
-
-
- #ifndef __CTidyHeap_AC__
- #include "CTidyHeap_AC.h"
- #endif
-
- #if qTidyHeap
-
- #ifndef __CTidyHeapLogFileLogger_AC__
- #include "CTidyHeapLogFileLogger_AC.h"
- #endif
-
- // toolbox
-
- #ifndef __ERRORS__
- #include <Errors.h>
- #endif
-
- // ANSI
-
- #ifndef _STRING
- #include <string.h>
- #endif
-
- //========================================================================================
- // class CTidyHeapLogFileLogger_AC
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CTidyHeapLogFileLogger_AC constructor
- //----------------------------------------------------------------------------------------
-
- CTidyHeapLogFileLogger_AC::CTidyHeapLogFileLogger_AC()
- {
- fFile.AppendExtension(".log");
- fFile.SetTypeAndCreator('TEXT','MPS ');
- }
-
- //----------------------------------------------------------------------------------------
- // CTidyHeapLogFileLogger_AC destructor
- //----------------------------------------------------------------------------------------
-
- CTidyHeapLogFileLogger_AC::~CTidyHeapLogFileLogger_AC()
- {
- }
-
- //----------------------------------------------------------------------------------------
- // CTidyHeapLogFileLogger_AC::Log
- //----------------------------------------------------------------------------------------
-
- void CTidyHeapLogFileLogger_AC::Log(char* inStr)
- {
- if(!fFile.IsOpen())
- fFile.Open(CTidyHeapFile_AC::kWrite);
-
- char lineFeed[2] = { 0xD, '\0' };
- ::strcat(inStr, lineFeed);
-
- fFile.Write( inStr, strlen(inStr));
- }
-
- #endif